/*
    count
*/
export default function countReducer(preState = 0, action) {
  const { type, data } = action
  // console.log(preState, action)
  switch (type) {
    case "increment":
      return preState + data
    //   break
    case "decrement":
      return preState - data
    //   break 
    default:
      return preState
  }
}
